<tc_include file="Public:head" />
<div class="container" id="container">
    <div class="page">
        <div class="page__bd" style="height: 100%; overflow: hidden;">
            <div class="weui-tab">
                <div class="parking-lot">
                    <form id="form_search" method="post" action="{:U('Brand/index')}">
                        <div class="weui-search-bar__box">
                            <input id="sort_name" name="sort_name" type="hidden" value="{$sort_name}">
                            <input type="search" class="weui-search-bar__input" id="searchInput" name="merchant_name" placeholder="输入商户名称或品牌名称" value="{$merchant_name}"><button type="submit"><i class="icon iconfont icon-search"></i></button>
                            <!--<a href="#" class="map-icon"><i class="icon iconfont icon-map"></i></a>-->
                        </div>
                    </form>
                </div>
                <!--menu-->
                <div class="menu-box">
                    <div class="weui-navbar integral-menu">
                        <div name="btn_sort" sort="1" class='weui-navbar__item <if condition="$sort_name==1">weui-bar__item_on</if>'>
                            <i class="icon iconfont icon-projectaddress"></i>
                            <span>街区排序<font>Block Sort</font></span>
                        </div>
                        <div name="btn_sort" sort="2" class='weui-navbar__item  <if condition="$sort_name==2">weui-bar__item_on</if>'>
                            <i class="icon iconfont icon-brands"></i>
                            <span>品牌排序<font>Brand Sort</font></span>
                        </div>
                        <div name="btn_sort" sort="3" class='weui-navbar__item  <if condition="$sort_name==3">weui-bar__item_on</if>'>
                            <i class="icon iconfont icon-defaultsort1"></i>
                            <span>默认排序<font>Default Sort</font></span>
                        </div>
                    </div>
                </div>
                <!--menu end-->
                <div class="weui-tab__panel">
                    <!--list-->
                    <div class="weui-cells shop-list" style="padding-top: 0">
                        <volist name="merchants" id="merchant">
                            <div class="weui-cell">
                                <div class="weui-cell__hd"><img src="<php>echo '/'.C('UPLOADPATH').$merchant['logo']</php>" alt=""></div>
                                <div class="weui-cell__bd">
                                    <h3>{$merchant['name']}</h3>
                                    <p><i class="icon iconfont icon-brands"></i> {$merchant['type_name_str']}    <font>{$merchant['area']}</font></p>
                                </div>
                                <!--<div class="weui-cell__ft"><i class="icon iconfont icon-map"></i></div>-->
                            </div>
                        </volist>
                    </div>
                    <!--list end-->
                </div>
                <tc_include file="Public:menu" />
            </div>
        </div>
    </div>
</div>
<tc_include file="Public:footer" />
<script>

       $("div[name=btn_sort]").click(function () {
           var sort = $(this).attr('sort');
           $("#sort_name").val(sort);
           $("#form_search").submit();
       });

</script>